Singly linked lists are a powerful abstraction that allow you to represent numerous types of data 單鏈表是讓您可以描述多種類型數(shù)據(jù)的一種有效抽象。
Conceptually , a singly linked list of integers looks like the following diagram in a computer s memory 從概念上講,在計算機內(nèi)存中,整數(shù)的單鏈表如下圖所示:
Using a singly linked list saves the overhead of updating an additional pointer for all operations as well as the memory for that pointer 使用單向鏈接表可省去更新所有操作的附加指針以及該指針的內(nèi)存的系統(tǒng)開銷。
This article will discuss only singly linked lists ; the terms " linked lists " and " lists " will both be used to mean singly linked lists 本文將只討論單鏈表;術語“鏈表( linked list ) ”和“列表( list ) ”都被用來表示單鏈表。
A singly linked list is a data structure that has an ordered sequence of nodes in which each node contains a data element and a pointer to the next node in the sequence 單鏈表是擁有有序節(jié)點序列的數(shù)據(jù)結構,其中,每個節(jié)點包含一個數(shù)據(jù)元素以及一個指向序列中下一個節(jié)點的指針。
List processing is one of the computer s biggest strengths ; singly linked lists provide the basis for a number of interesting algorithms and techniques that are useful in every aspect of programming 列表( list )處理是計算機最強功能之一;單鏈表( singly linked lists )為可以應用于編程各個方面的許多有趣的算法和技術提供了基礎。
Singly linked lists are a powerful abstraction that allow programmers to represent numerous types of data ; extending those lists to handle arbitrary data types can offer effective tools for processing data 單鏈表是使得程序員可以描述多種類型的數(shù)據(jù)的一種有效抽象;可以將鏈表的使用擴展到任意類型數(shù)據(jù)的處理當中,這為處理數(shù)據(jù)提供一個有效的工具。
Firstly , singly linked lists are used as the data structure of this algorithm rather than doubly linked lists or trees as other algorithms use , so less memory space and running time are required . secondly , the relationship between the entry and exit points on the two polygons is found and argumentation , which , with the reasonable operations on the lists , reduces the times that the lists are traversed and allows the polygon to be input clockwise or counterclockwise 該算法使用單線性鏈表數(shù)據(jù)結構,與其它使用雙鏈表或樹結構的算法相比具有占用空間少及處理速度快的特點;其次,找出并論證兩個多邊形之間進、出點之間的關系,并通過合理的數(shù)據(jù)結構處理,減少了算法對多邊形鏈表的遍歷次數(shù),而且允許多邊形既可以按順時針方向也可以按逆時針方向輸入。